﻿using AntdUI;
using Super.Admin.Models.Department;
using Super.Admin.Models.UserRole;

namespace Super.Admin.Models.User
{
    public class UserDetatilModel : UserBaseModel
    {

        private bool _check;
        /// <summary>
        /// 是否选中
        /// </summary>
        public bool Check
        {
            get { return _check; }
            set
            {
                if (_check == value) return;
                SetProperty<bool>(ref _check, value);
            }
        }

        private CellImage[] _gravatarImage;
        /// <summary>
        /// 头像
        /// </summary>
        public CellImage[] GravatarImage
        {
            get { return _gravatarImage; }
            set { SetProperty<CellImage[]>(ref _gravatarImage, value); }
        }

        private AntdUI.CellLink[] _operates;
        /// <summary>
        /// 操作按钮
        /// </summary>
        public AntdUI.CellLink[] Operates
        {
            get => _operates;
            set
            {
                SetProperty<CellLink[]>(ref _operates, value);
            }
        }

        private AntdUI.CellTag[] _genderTag;
        /// <summary>
        /// 性别
        /// </summary>
        public AntdUI.CellTag[] GenderTag
        {
            get => _genderTag;
            set
            {
                SetProperty<CellTag[]>(ref _genderTag, value);
            }
        }

        private AntdUI.CellTag[] _userRoleTags;
        /// <summary>
        /// 角色标签
        /// </summary>
        public AntdUI.CellTag[] UserRoleTags
        {
            get => _userRoleTags;
            set
            {
                SetProperty<CellTag[]>(ref _userRoleTags, value);
            }
        }

        private AntdUI.CellTag[] _isActiveTag = new CellTag[] { new CellTag("未知", TTypeMini.Default) };
        /// <summary>
        /// 状态
        /// </summary>
        public AntdUI.CellTag[] IsActiveTag
        {
            get => _isActiveTag;
            set
            {
                SetProperty<CellTag[]>(ref _isActiveTag, value);
            }
        }

        private string _departmentName;
        /// <summary>
        /// 部门
        /// </summary>
        public string DepartmentName
        {
            get { return _departmentName; }
            set { SetProperty<string>(ref _departmentName, value); }
        }

        /// <summary>
        /// 用户角色
        /// </summary>
        public List<UserRoleDetailModel> UserRoles { get; set; } = new List<UserRoleDetailModel>();
        /// <summary>
        /// 用户管理的部门
        /// </summary>
        public List<DepartmentBaseModel> ManangerDepartments { get; set; }
        /// <summary>
        /// 用户部门
        /// </summary>
        public DepartmentBaseModel Department { get; set; }

    }
}
